package chapter05.exercise;

/**
 * 可变长参数类型   重载错误示例
 *
 * @author cinyi
 */
public class OverloadingVarargs2 {

    static void f(float i, Character... args) {
        System.out.println("first");
    }

    static void f(Character... args) {
        System.out.println("second");
    }

    public static void main(String[] args) {
        f(1F, 'a', 'b', 'c');
//		f('a','b','c'); //加上这句会显示编译错误:The method f(float, Character[]) is ambiguous for the type OverloadingVarargs2
    }

}
